package com.sjzxywlkj.cplife.alipay.conn;

import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.request.AlipayDataDataserviceBillDownloadurlQueryRequest;
import com.alipay.api.response.AlipayDataDataserviceBillDownloadurlQueryResponse;
import com.sjzxywlkj.cplife.alipay.config.AlipayConfig;
import com.sjzxywlkj.cplife.alipay.request.entity.BillDown;

/**
 * 账单下载操作
 */
public class BillDownConn {

    public static AlipayDataDataserviceBillDownloadurlQueryResponse query(BillDown billDown, String app_auth_token) throws AlipayApiException {

        AlipayClient alipayClient = AlipayConfig.aClient();
        AlipayDataDataserviceBillDownloadurlQueryRequest request = new AlipayDataDataserviceBillDownloadurlQueryRequest();
        request.putOtherTextParam("app_auth_token", app_auth_token);
        request.setBizContent(billDown.toJson());
        AlipayDataDataserviceBillDownloadurlQueryResponse response = alipayClient.execute(request);
        return response;

    }


}
